import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*


testCase = "DBshop008_查看销售管理支付记录"


# 登录后台管理系统,地址是"http://localhost/dbshop/admin"
firefox=openBrowser(urlAdmin)
#调用自定义函数进行后台的登录
DBshopLoginAdmin(firefox)
#调用后台的菜单操作函数
DBshopEnterMenu2(firefox,'销售管理','支付记录')
firefox.find_element_by_xpath("//table/tbody/tr[1]/td[1]/a").click()
a=firefox.find_element_by_xpath("(//div[@class='well admin_add_well'])[1]/dl/dd[1]").text
print(a)
try:
    firefox.find_element_by_xpath("//span[@class='text-success']").text==\
    firefox.find_element_by_xpath("(//div[@class='well admin_add_well'])[1]/dl/dd[1]").text
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)

